Skip to content

Conversation

@cwasicki
Copy link
Collaborator

  • list_trades allows listing and streaming public trades for specified delivery periods. If no delivery start is given, starts streaming all new public trades.
  • list_orders allows listing and streaming orders for specified delivery periods and gridpool IDs. If no delivery start is given, starts streaming all new orders for this gridpool ID.

This also changes the argument parsing for the day-ahead command to use the click library to support more complex interactions. In future the listing of day ahead prices from the entsoe API might be moved into a separate CLI tool.

@cwasicki cwasicki requested a review from a team as a code owner January 14, 2025 09:23
@github-actions github-actions bot added the part:docs Affects the documentation label Jan 14, 2025
@cwasicki cwasicki force-pushed the trades branch 2 times, most recently from 311b2ff to c8f0693 Compare January 14, 2025 09:50
from datetime import datetime, timedelta
from zoneinfo import ZoneInfo

import click
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to go in pyproject.toml as well, I think.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.


from frequenz.client.electricity_trading.cli.day_ahead import list_day_ahead_prices

TZ = ZoneInfo("Europe/Berlin")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should take it from the "TZ" environment variable and use Berlin as the default, in case we want to call the command with UTC, etc., for whatever reason.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wanted to keep this since this is the timezone used on EEX and EPEX, which is what is supported for day-ahead prices.

The click library allows for more complex interactions with the CLI tool
for upcoming changes that add support for interacting with the actual
trading API.

In future the listing of day ahead prices from the entsoe API might be
moved into a separate CLI tool.

Signed-off-by: cwasicki <[email protected]>
Introduces CLI commands to interact with the trading API:
- `list_trades` allows listing and streaming public trades for specified
  delivery periods. If no delivery start is given, starts streaming all
  new public trades.
- `list_orders` allows listing and streaming orders for specified
  delivery periods and gridpool IDs. If no delivery start is given,
  starts streaming all new orders for this gridpool ID.

Signed-off-by: cwasicki <[email protected]>
Signed-off-by: cwasicki <[email protected]>
@github-actions github-actions bot added the part:tooling Affects the development tooling (CI, deployment, dependency management, etc.) label Jan 14, 2025
Copy link
Collaborator Author

@cwasicki cwasicki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

from datetime import datetime, timedelta
from zoneinfo import ZoneInfo

import click
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.


from frequenz.client.electricity_trading.cli.day_ahead import list_day_ahead_prices

TZ = ZoneInfo("Europe/Berlin")
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wanted to keep this since this is the timezone used on EEX and EPEX, which is what is supported for day-ahead prices.

@cwasicki cwasicki added this pull request to the merge queue Jan 14, 2025
Merged via the queue into frequenz-floss:v0.x.x with commit 6cf69ef Jan 14, 2025
14 checks passed
@cwasicki cwasicki deleted the trades branch January 14, 2025 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

part:docs Affects the documentation part:tooling Affects the development tooling (CI, deployment, dependency management, etc.)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants